package hutool;

import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import org.junit.Test;

import java.util.List;

public class ToolTest {
    @Test
    public void test1(){
        String fileName = StrUtil.removeSuffix("pretty_girl.jpg", ".jpg");  //fileName -> pretty_girl
        System.out.println(fileName);
        String str = "abcdefgh";
        String strSub2 = StrUtil.sub(str, 2, -4); //strSub2 -> cde
        System.out.println(strSub2);
        List strList = Convert.toList(String.class, new String[]{"1", "2", "3"});

        System.out.println(ObjectUtil.contains(strList, "1"));
        double div=NumberUtil.div(20 , 3);
        System.out.println(div);
        System.out.println(NumberUtil.round(div, 2));

    }
}
